package com.ruoyi.littleRedBook.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.littleRedBook.domain.pojo.UserAddress;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface UserAddressMapper extends BaseMapper<UserAddress> {
    int countByUserId(@Param("userId") Long userId);

    List<UserAddress> selectByUserId(@Param("userId") Long userId);

    UserAddress selectDefaultByUserId(@Param("userId") Long userId);

    int updateNonDefaultByUserId(@Param("userId") Long userId);

    List<UserAddress> selectByUserIdExcludeId(@Param("userId") Long userId, @Param("excludeId") Long excludeId);
}
